#pragma once

namespace wjb
{
	template<size_t N>
	class bitset
	{
	public:

		bitset()
		{
			int n = N / 32 + 1;
			_b.resize(n);
		}
		void set(int num)
		{
			int row = num / 32;
			int cow = num % 32;
			_b[row] |= (1 << cow);
		}

		void reset(int num)
		{
			int row = num / 32;
			int cow = num % 32;
			_b[row] ^= (1 << cow);
		}

		bool test(int num)
		{
			int row = num / 32;
			int cow = num % 32;
			return _b[row] & (1 << cow);
		}
	private:
		vector<int> _b;
	};
}